//
//  PictureViewController.m
//  WZYInteriorDesign
//
//  Created by lanou on 15/12/18.
//  Copyright (c) 2015年 lanou. All rights reserved.
//

#import "PictureViewController.h"
#import "UIImageView+AFNetworking.h"
#import "MainDetailModel.h"
#import "MainDetailViewController.h"
@interface PictureViewController ()

@end

@implementation PictureViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor cyanColor];
   // self.view.title = @"大图详情";
    UIImageView *pictureView = [[UIImageView alloc]initWithFrame:CGRectMake(20, 100, 330, 450)];
    pictureView.backgroundColor = [UIColor redColor];
    [pictureView setImageWithURL:[NSURL URLWithString:self.mainDail.pic]];
    [self.view addSubview:pictureView];
    //添加返回按钮
    UIButton *backButton = [UIButton buttonWithType:UIButtonTypeSystem];
    backButton.frame = CGRectMake(15, 15, 30, 30);
    [backButton addTarget:self action:@selector(disMissCollectionView) forControlEvents:(UIControlEventTouchUpInside)];
    [backButton setImage:[UIImage imageNamed:@"arrowdown.png"] forState:(UIControlStateNormal)];
    [backButton setTintColor:[UIColor redColor]];
    [self.view addSubview:backButton];
    // Do any additional setup after loading the view.
}

- (void)disMissCollectionView{
    [self dismissViewControllerAnimated:YES completion:nil];
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
